package com.ddx.common.enums;

/**
 * 假数据类型
 */
public enum ManufactureType {
//    产品假数据
    PRODUCT(1,"product");
    private Integer code;
    private String msg;

    ManufactureType(Integer code, String msg) {
        this.code=code;
        this.msg=msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public static ManufactureType getManufactureType(Integer code) {
        for (ManufactureType t : ManufactureType.values()) {
            if (code.equals(t.getCode())) {
                return t;
            }
        }
        return null;
    }
}
